        <div class="crumb">
            <ts:itemLink item="${torrentInstance.item}">${torrentInstance.item.title}</ts:itemLink> &gt;
            Download details
        </div>
        <div class="clear"></div>
        <div class="rule"><hr /></div>

        <div id="torrent-info" class="body hentry">
            <h2 class="entry-title full-title">${torrentInstance.name}</h2>

            <div class="page-menu" style="float:right">
                <ts:downloadLink torrent="${torrentInstance}"><img src="/images/icons/download_128x128.png" title="Download torrent file" alt="Download torrent file"/></ts:downloadLink>
            </div>

            <div class="body-section">
                <ul>
                    <li><ts:torrentSeedCount torrent="${torrentInstance}" /> seed(s), ${torrentInstance.stats ? torrentInstance.stats.peers : 0} peer(s)</li>
<g:if test="${torrentInstance.seedbanks?.size() > 0}">
                    <li>Served from ${torrentInstance.seedbanks?.size()} seed bank(s)</li>
</g:if>
                    <li>${torrentInstance.stats ? torrentInstance.stats.completed : 0} completed download(s)</li>
                </ul>
<g:if test="${canEditItem}">
    <g:if test="${torrentInstance.seedbanks?.size() > 0}">
                Served from seed bank(s):
                <ul>
        <g:each in="${torrentInstance.seedbanks}" var="seedbankTorrent">
            <g:set var="sbInstance" value="${seedbankTorrent.seedbank}" />
                    <li>
                        <g:link controller="seedbank" action="show" id="${sbInstance.id}">${sbInstance.name} (${sbInstance.ipAddress})</g:link>
                        (<g:link controller="seedbank" action="unlink" id="${sbInstance.id}" params="${['info_hash':torrentInstance.infoHash]}">un-seed</g:link>)
                    </li>
        </g:each>
                </ul>
    </g:if>
<%--
    <g:else>
            <% def uploadUrl = g.createLink(controller:'seedbankUpload', action:'start') %>
            <r:script disposition='head'>
                $(function(){
                    $("#start-upload-button").click(function(){
                        $.getJSON(
                            '${uploadUrl}',
                            {infoHash:"${torrentInstance.infoHash}"},
                            function(json) {
                                ts_displayJsonMessage(json);
                            }
                        );
                    });
                });
            </r:script>
            <ul><li>
                <input type="submit" id="start-upload-button" class="ajax-button" style="width:160px" value="Upload files to seedbank" />
            </li></ul>
    </g:else>
--%>
</g:if><%-- if canEditItem --%>
            </div>

            <div class="body-section">
                <h3 class="entry-title full-title">Files (<ts:formatFileSize file_size="${torrentInstance.size}" precision="2"/> total)</h3>
<% if (torrentFileList) { %>
                <table class="file-list" cellspacing="0">
<g:each status="i" in="${torrentFileList}" var="fileItem">
                    <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
                        <td>${fileItem.path}</td>
                        <td><ts:formatFileSize file_size="${fileItem.length}" precision="2"/></td>
                    </tr>
</g:each>
                </table>
<% } else { %>
                File information not available.
<% } %>
            </div>

            <div class="clear"></div>
            <div class="attribute left">
                <span class="by alt-font">Published by</span> ${torrentInstance.item.owner.username}
                <span class="date full-date"> <span class="ndash alt-font">&ndash;</span> <joda:format value="${torrentInstance.published}" style="L-" /></span>
            </div>

            <div class="clear"></div>
            <div class="rule"><hr /></div>
<g:if test="${canEditItem}">
            <div class="edit delete-item">
                <g:link action="delete" id="${torrentInstance.infoHash}" title="Delete torrent"
                    onclick="return confirm('${message(code: 'torrent.delete.confirm.message')}');" class="edit-button">Delete torrent</g:link>
            </div>
</g:if>
        </div><!-- torrent-details -->
